package com.demo.springBootDemo04.web;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class IndexController {

	@RequestMapping("/")
	public Object index() {
		return "welcome";
	}

	@RequestMapping("/hello/{name}")
	public Object hello(@PathVariable("name") String name) {
		return String.format("Hello,%s", name);
	}

}
